<%@page import="com.wef.demo.entity.domain.StudentSubjectDomain"%>
<%@page import="com.wef.demo.entity.domain.StudentDomain"%>
<%@page import="com.wef.demo.entity.domain.ClazzDomain"%>
<%@page import="com.wef.demo.entity.domain.SubjectDomain"%>
<%@page import="com.gfa4j.resource.ResourceManagerServer"%>
<%@page import="com.wef.common.util.CommonMessageDomain"%>
<%@page import="com.gfa4j.query.Field"%>
<%@ include file="/pages/common/taglib.jsp"%>
<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></meta>
		<title></title>
		<%@include file="/styles/css_lib.jsp"%>
		<%@include file="/scripts/widgets/jquery-ui/css_lib.jsp"%>
		<%@include file="/scripts/widgets/jqgrid/css_lib.jsp"%>
		<%@include file="/scripts/widgets/autoSelect/css_lib.jsp"%>
		
		<%@include file="/pages/common/js_global.jsp"%>
		<%@include file="/scripts/sdk/js_lib.jsp"%>
		<%@include file="/scripts/config/js_lib.jsp" %>
		<%@include file="/scripts/utils/js_lib.jsp"%>
		<%@include file="/scripts/i18n/js_lib.jsp"%>
		<%@include file="/scripts/format/js_lib.jsp"%>
		<%@include file="/scripts/validate/js_lib.jsp"%>
		<%@include file="/scripts/widgets/jquery-ui/js_lib.jsp"%>
		<%@include file="/scripts/widgets/jqgrid/js_lib.jsp"%>
		<%@include file="/scripts/widgets/autoSelect/js_lib.jsp"%>
		<%@include file="/scripts/widgets/datePicker/js_lib.jsp"%>
		<%@include file="/scripts/widgets/page-custom/js_lib.jsp"%>
		<script type="text/javascript" src="./demo_custom_save2.js"></script>

		<k:customSaveConfig
			callback="callback4Student"
			editFormName="editFormStudent"
			saveBtnId="saveBtnStudent"
			objectName="<%=StudentDomain.Student%>"
			serviceMethodName="saveOrUpdateStudent"
			serviceName="StudentService"
			initProps="clazz"
			afterProcessing="afterProcessing4Student"
		/>

		<k:autoSelectConfig 
			url="${ctx}" 
			id="editClazzName" 
			width="300" 
			queryField="clazzName,clazzNum,lesder"
			displayField="clazzName,clazzNum,lesder" 
			className="com.wef.demo.entity.Clazz" 
			displayFieldI18n="demo.Clazz.clazzName,demo.Clazz.count,demo.Clazz.clazzNum,demo.Clazz.lesder,demo.Clazz.fee" 
			displayNum="8"
			canNotInput="false"
			afterSelectRow="afterSelectRow4EditClazzName"
			autoFill="editClazzName|{clazzName}"
		/>
		
		<script type="text/javascript">
			//App.pageCustomEnable = true;App.pageId = "jqgrid";
			$(window).ready(function(){
				$('div[accordion=true]').accordion({collapsible : true});
				$('div[tabGroup=true]').tabs();
				$('#pageLoadComplete').attr('isComplete',true);
			});
		</script>
	</head>
<body class="body">
	<div id="divAccordion1" accordion="true">
		<h1><a href="#"><%=ResourceManagerServer.getInstance().getMessage(StudentDomain.StudentNLS)%>&nbsp;<%=ResourceManagerServer.getInstance().getMessage(CommonMessageDomain.TITLE_EDIT)%></a></h1>
		<div>
			<form id="editFormStudent" name="editFormStudent">
				<ul id="editUlStudent" allowChange="true" class="edit_box">
					<k:hidden property="studentId" styleId="editStudentId"/>
					<li>
						<k:label text="demo.Student.studentNum" allowBlank="false"/>
						<k:text property="studentNum" styleId="editStudentNum" styleClass="text" validateRules="{required:true}"/>
					</li>
					<li>
						<k:label text="demo.Student.studentName" allowBlank="false"/>
						<k:text property="studentName" styleId="editStudentName" styleClass="text" validateRules="{required:true}"/>
					</li>
					<li>
						<k:label text="demo.Student.birthday" allowBlank="false"/>
						<k:date property="birthday" styleId="editBirthday" styleClass="text" validateRules="{required:true}"/>
					</li>
					<li>
						<k:label text="demo.Student.address" allowBlank="false"/>
						<k:text property="address" styleId="editAddress" styleClass="text" validateRules="{required:true}"/>
					</li>
				</ul>
			</form>
		</div>
	</div>
	
	<div class="ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content-active">
		<ul class="button_box">
			<li>
				<k:button styleId="saveBtnStudent" styleClass="button ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" text="<%=CommonMessageDomain.BUTTON_SAVE%>"/>
			</li>
		</ul>
	</div>
	
	<div id="tabs" tabGroup="true">
		<ul>
			<li><a id="aTabItem1" href="#tabItem1"><%=ResourceManagerServer.getInstance().getMessage(ClazzDomain.ClazzNLS)%>&nbsp;<%=ResourceManagerServer.getInstance().getMessage(CommonMessageDomain.TITLE_EDIT)%></a></li>
		</ul>
		
		<div id="tabItem1">
			<div id="divAccordion2" accordion="true">
				<h1><a href="#"><%=ResourceManagerServer.getInstance().getMessage(StudentDomain.StudentNLS)%>&nbsp;<%=ResourceManagerServer.getInstance().getMessage(CommonMessageDomain.TITLE_EDIT)%></a></h1>
				<div>
					<form id="editFormStudent2" name="editFormStudent">
						<ul id="editUlStudent" allowChange="true" class="edit_box">
							<k:hidden property="studentId" styleId="editStudentId"/>
							<li>
								<k:label text="demo.Student.telphone" allowBlank="false"/>
								<k:text property="telphone" styleId="editTelphone" styleClass="text" validateRules="{required:true}"/>
							</li>
							<li>
								<k:label text="demo.Student.gender" allowBlank="false"/>
								<k:select property="gender" styleClass="select">
									<k:option value="" text="请选择" />
									<k:option value="true" text="男" />
									<k:option value="false" text="女" />
								</k:select>
<%-- 								<k:radio property="gender" text="男" value="true" /> --%>
<%-- 								<k:radio property="gender" text="女" value="false" /> --%>
		<%-- 							<k:checkbox property="gender" styleId="editGender" checked="true" formatRules="{checkedValueMap:{checked:true,unChecked:false}}"/> --%>
							</li>
							<li>
								<k:label text="demo.Student.email" allowBlank="false"/>
								<k:text property="email" styleId="editEmail" styleClass="text" validateRules="{required:true}"/>
							</li>
							<li>
								<k:label text="demo.Student.idCard" allowBlank="false"/>
								<k:text property="idCard" styleId="editIdCard" styleClass="text" validateRules="{required:true}"/>
							</li>
							<li>
								<k:label text="demo.Student.remark" allowBlank="false"/>
								<k:textarea property="remark" styleId="editRemark" validateRules="{required:true}"/>
							</li>
							<li>
								<k:label text="demo.Clazz.clazzName" allowBlank="false"/>
								<k:autoSelect styleId="editClazzName" property="clazzName"/>
							</li>
							<li>
								<k:label text="demo.Clazz.clazzNum" allowBlank="false"/>
								<k:select property="clazzNum" styleId="editClazzNum" styleClass="select"></k:select>
							</li>
						</ul>
					</form>
				</div>
			</div>	
		</div>
	</div>
	<div id="pageLoadComplete" isComplete="false" style="display: none;"></div>
</body>
</html>